In mathematics, the sign of a real number is its property of being either positive, negative number, or 0. Depending on local conventions, zero may be considered as having its own unique sign, having no sign, or having both positive and negative sign. In some contexts, it makes sense to distinguish between signed zero.
In mathematics and physics, the phrase "change of sign" is associated with exchanging an object for its additive inverse (multiplication with −1, negation), an operation which is not restricted to real numbers. It applies among other objects to vectors, matrices, and complex numbers, which are not prescribed to be only either positive, negative, or zero.
The word "sign" is also often used to indicate binary aspects of mathematical or scientific objects, such as odd and even (sign of a permutation), sense of orientation or rotation (clockwise), one sided limits, and other concepts described in below.
When a minus sign is used in between two numbers, it represents the binary operation of subtraction. When a minus sign is written before a single number, it represents the unary operation of yielding the additive inverse (sometimes called negation) of the operand. Abstractly then, the difference of two number is the sum of the minuend with the additive inverse of the subtrahend. While is its own additive inverse (), the additive inverse of a positive number is negative, and the additive inverse of a negative number is positive. A double application of this operation is written as . The plus sign is predominantly used in algebra to denote the binary operation of addition, and only rarely to emphasize the positivity of an expression.
In common numeral system (used in arithmetic and elsewhere), the sign of a number is often made explicit by placing a plus or a minus sign before the number. For example, denotes "positive three", and denotes "negative three" (algebraically: the additive inverse of ). Without specific context (or when no explicit sign is given), a number is interpreted per default as positive. This notation establishes a strong association of the minus sign "" with negative numbers, and the plus sign "+" with positive numbers.
In certain European countries, e.g. in Belgium and France, is considered to be both positive and negative following the convention set forth by Nicolas Bourbaki..
In some contexts, such as floating-point representations of real numbers within computers, it is useful to consider signed versions of zero, with referring to different, discrete number representations (see signed number representations for more).
The symbols and rarely appear as substitutes for and , used in calculus and mathematical analysis for (right-sided limit and left-sided limit, respectively). This notation refers to the behaviour of a function as its real input variable approaches along positive (resp., negative) values; the two limits need not exist or agree.
When is said to be both positive and negative, modified phrases are used to refer to the sign of a number:
For example, the absolute value of a real number is always "non-negative", but is not necessarily "positive" in the first interpretation, whereas in the second interpretation, it is called "positive"—though not necessarily "strictly positive".
The same terminology is sometimes used for functions that yield real or other signed values. For example, a function would be called a positive function if its values are positive for all arguments of its domain, or a non-negative function if all of its values are non-negative.
For example, the absolute value of and the absolute value of are both equal to . This is written in symbols as and .
In general, any arbitrary real value can be specified by its magnitude and its sign. Using the standard encoding, any real value is given by the product of the magnitude and the sign in standard encoding. This relation can be generalized to define a sign for complex numbers.
Since the real and complex numbers both form a field and contain the positive reals, they also contain the reciprocals of the magnitudes of all non-zero numbers. This means that any non-zero number may be multiplied with the reciprocal of its magnitude, that is, divided by its magnitude. It is immediate that the quotient of any non-zero real number by its magnitude yields exactly its sign. By analogy, the can be defined as the quotient and its The sign of a complex number is the exponential of the product of its argument with the imaginary unit. represents in some sense its complex argument. This is to be compared to the sign of real numbers, except with For the definition of a complex sign-function. see below.
Analogous to above, the complex sign function extracts the complex sign of a complex number by mapping the set of non-zero complex numbers to the set of unimodular complex numbers, and to : It may be defined as follows:
Let be also expressed by its magnitude and one of its arguments as then
This definition may also be recognized as a normalized vector, that is, a vector whose direction is unchanged, and whose length is fixed to Unit vector. If the original value was R,θ in polar form, then sign(R, θ) is 1 θ. Extension of sign() or signum() to any number of dimensions is obvious, but this has already been defined as normalizing a vector.
It is also possible to associate a sign to an angle of rotation in three dimensions, assuming that the axis of rotation has been oriented. Specifically, a right-hand rule rotation around an oriented axis typically counts as positive, while a left-handed rotation counts as negative.
An angle which is the negative of a given angle has an equal arc, but the opposite axis.Alexander Macfarlane (1894) "Fundamental theorems of analysis generalized for space", page 3, link via Internet Archive
Using this convention, an increase in x counts as positive change, while a decrease of x counts as negative change. In calculus, this same convention is used in the definition of the derivative. As a result, any increasing function has positive derivative, while any decreasing function has negative derivative.
On the Cartesian plane, the rightward and upward directions are usually thought of as positive, with rightward being the positive x-direction, and upward being the positive y-direction. If a displacement Euclidean vector is separated into its , then the horizontal part will be positive for motion to the right and negative for motion to the left, while the vertical part will be positive for motion upward and negative for motion downward.
Likewise, a negative speed (rate of change of displacement) implies a velocity in the opposite direction, i.e., receding instead of advancing; a special case is the radial speed.
In 3D space, notions related to sign can be found in the two normal orientations and orientability in general.
0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 127 |
0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 126 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | −1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | −2 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | −127 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | −128 |
Most computers use two's complement to represent the sign of an integer. |
In computing, an integer value may be either signed or unsigned, depending on whether the computer is keeping track of a sign for the number. By restricting an integer variable to non-negative values only, one more bit can be used for storing the value of a number. Because of the way integer arithmetic is done within computers, signed number representations usually do not store the sign as a single independent bit, instead using e.g. two's complement.
In contrast, real numbers are stored and manipulated as floating point values. The floating point values are represented using three separate values, mantissa, exponent, and sign. Given this separate sign bit, it is possible to represent both positive and negative zero. Most programming languages normally treat positive zero and negative zero as equivalent values, albeit, they provide means by which the distinction can be detected.
|
|